package Day29;

import java.util.*;

public class Main {

    public static void main (String[] args) {

        Scanner in = new Scanner(System.in);

        while (in.hasNextInt()) {

            int n = in.nextInt();
            if (n == 0) {
                return;
            }

            int count = 0;
            while (n != 1 && n != 0) {
                n >>= 1;
                count++;
            }

            System.out.println(count);
        }

    }

}